package com.gopay.common.domain.ic;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * @Description 切日订单记录表
 * @Author jianghoupeng
 * @Date 2017/1/16 10:59
 *
 * Copyright (c) 2017. www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "IC_NEXT_DAY_ORDER")
public class NextDayOrder extends BaseEntity {

	private Long keyId;			//主键

	private String checkDate;			//对账日期

	private String gopayOrderId;			//国付宝订单号

	private Date newStlmTime;   //新清算时间

	private Date oldStlmTime;   //原来的清算时间

	private Date createdTs;			//创建时间

	private Integer version;			//乐观锁版本号

	private Date lastUpdTs;//最后修改时间


	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "IC_NEXT_DAY_ORDER_SEQ")
	@SequenceGenerator(name = "IC_NEXT_DAY_ORDER_SEQ", allocationSize = 1, initialValue = 1, sequenceName = "IC_NEXT_DAY_ORDER_SEQ")
	@Column(name = "KEY_ID")
	public Long getKeyId() {
		return keyId;
	}

	public void setKeyId(Long keyId) {
		this.keyId = keyId;
	}

	@Column(name = "CHECK_DATE")
	public String getCheckDate() {
		return checkDate;
	}

	public void setCheckDate(String checkDate) {
		this.checkDate = checkDate;
	}

	@Column(name = "CREATED_TS")
	public Date getCreatedTs() {
		return createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}

	@Column(name = "LAST_UPD_TS")
	public Date getLastUpdTs() {
		return lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Version
	@Column(name = "VERSION")
	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name = "GOPAY_ORDER_ID")
	public String getGopayOrderId() {
		return gopayOrderId;
	}

	public void setGopayOrderId(String gopayOrderId) {
		this.gopayOrderId = gopayOrderId;
	}

	@Column(name = "NEW_STLM_TIME")
	public Date getNewStlmTime() {
		return newStlmTime;
	}

	public void setNewStlmTime(Date newStlmTime) {
		this.newStlmTime = newStlmTime;
	}

	@Column(name = "OLD_STLM_TIME")
	public Date getOldStlmTime() {
		return oldStlmTime;
	}

	public void setOldStlmTime(Date oldStlmTime) {
		this.oldStlmTime = oldStlmTime;
	}
}
